<template>
  <div class="container">
    <div class="top-box">
      <div class="left-box">
        <div class="color-box"></div>
        <p>申请调车详情</p>
      </div>
      <div class="right-box">
        <el-button type="info" icon="el-icon-back" class="btn_fanhui" @click="Return">返回</el-button>
      </div>
    </div>
    <div class="content-box">
      <!-- <div class="examine-box">
        <el-steps :active="2" align-center class="step">
          <el-step title="提交申请" :description="createon"></el-step>
          <el-step title="分管领导：已通过" :description="leadpassdate"></el-step>
          <el-step title="管理部：已通知" :description="managedate"></el-step>
        </el-steps>
      </div> -->
      <div class="nav-box">
        <ul>
          <li>
            <span>
              公司：
              <em>{{item.company}}</em>
            </span>
          </li>
          <li>
            <span>
              申请人:
              <em>{{item.name}}</em>
            </span>
          </li>
          <li>
            <span>
              职位:
              <em>{{item.postName}}</em>
            </span>
          </li>
        </ul>
      </div>
      <div class="table-box">
        <ul>
          <li>
            <div class="item-box">申请数量</div>
            <div class="item1-box">
              <input type="text" v-model="item.Num" placeholder="" />
            </div>
            <div class="item-box">驾驶员</div>
            <div class="item2-box">
              <input type="text" v-model="item.DriverNeed" placeholder />
            </div>
          </li>
          <li>
            <div class="item-box">用车时间</div>
            <div class="item1-box">
              <input type="text" v-model="item.UseTime" placeholder />
            </div>
            <div class="item-box">归还时间</div>
            <div class="item2-box">
              <input type="text" v-model="item.ReturnTime" placeholder />
            </div>
          </li>
          <li>
            <div class="item-box">去往地点</div>
            <div class="item1-box">
              <input type="text" v-model="item.GoAddreess" placeholder />
            </div>
            <div class="item-box">发车地点</div>
            <div class="item2-box">
              <input type="text" v-model="item.FromAddress" placeholder />
            </div>
          </li>
          <li>
            <div class="item-box">借车公司</div>
            <div class="item6-box">{{item.Partners}}</div>
          </li>
          <li class="large-box">
            <div class="item5-box">申请原因</div>
            <div class="item6-box">
              <textarea v-model="item.Reasons" placeholder=""></textarea>
            </div>
          </li>
        </ul>
      </div>
      <div class="btn-box" v-show="shows==0">
        <el-button type="primary">确定</el-button>
        <el-button type="info" @click="Return">返回</el-button>
      </div>
    </div>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data () {
    return {
      item: {
        Partners: "",
        Num: "",
        DriverNeed: "",
        UseTime: "",
        ReturnTime: "",
        GoAddreess: "",
        FromAddress: "",
        Reasons: "",
        postName:"",
        name:"",
        company:""
      },
      id: 0,
      shows: 1,
    }
  },
  created () {
    this.shows = this.$route.query.shows;
    this.id = this.$route.query.e;
    this.getnewlist()
  },
  methods: {
    Return () {
      window.history.go(-1);
    },
    getnewlist () {
      let obj = {
        id: this.id
      };
      var objs = JSON.stringify(obj);
      let the = { index: 18, jsondata: objs }
      console.log(objs)
      axios.post("/apis/AdministrationManage.asmx/GetData", the).then(({ data }) => {
        var list = eval('(' + data.d + ')');
        // console.log(list)
        this.item = list;
      });
    },
  }
}
</script>
<style lang="scss" scoped>
@import '@/assets/scss/base.scss';
.top-box {
  width: 100%;
  height: 60px;
  overflow: hidden;
  // border: 1px solid $red;
}
.left-box {
  width: 150px;
  height: 40px;
  float: left;
  margin-top: 10px;
  overflow: hidden;
  margin-left: 1%;
  // border: 1px solid red;
}
.color-box {
  width: 5px;
  height: 20px;
  float: left;
  margin-top: 10px;
  background-color: $Header_color;
}
.left-box p {
  float: left;
  margin-left: 5px;
  line-height: 40px;
}
.right-box {
  float: right;
  width: 90px;
  height: 40px;
  margin-right: 2%;
  border-radius: 8px;
  margin-top: 10px;
  background-color: $return-color;
  // border: 1px solid red;
}
.right-box:hover {
  background-color: #a4a6ad;
}
.right-box span {
  float: left;
  color: $white;
  font-size: $font-size-medium;
  line-height: 40px;
  //  border: 1px solid red;
}
.right-box img {
  width: 30px;
  height: 30px;
  margin-top: 5px;
  margin-left: 6px;
  float: left;
  // border: 1px solid red;
}
.content-box {
  width: 98%;
  height: 800px;
  margin: 0 auto;
  border-radius: 8px;
  background-color: $white;
  border: 1px solid $bordercolor;
}
.examine-box {
  width: 85%;
  height: 112px;
  overflow: hidden;
  margin: 0 auto;
  margin-top: 40px;
  // border: 1px solid red;
}
.leftexam-box {
  width: 15%;
  height: 110px;
  float: left;
  border-radius: 8px;
  border: 1px solid $bordercolor;
  // border: 1px solid red;
}
.leftexam-box p {
  width: 100%;
  line-height: 70px;
  font-size: $font-size-medium-x;
  font-weight: bold;
  text-align: center;
}
.leftexam-box span {
  display: inline-block;
  width: 100%;
  font-size: $font-size-medium;
  text-align: center;
}
.Middlexam-box {
  width: 27%;
  height: 8px;
  margin-top: 51px;
  float: left;
  border-top: 1px solid #93a0e5;
  border-bottom: 1px solid #93a0e5;
  background-color: #a9b4ed;
  // border: 1px solid red;
}
.rightexam-box {
  width: 15%;
  height: 110px;
  float: left;
  border-radius: 8px;
  background-color: #5167d2;
  // border:1px solid red;
}
.rightexam-box p {
  width: 100%;
  line-height: 70px;
  color: $white;
  font-size: $font-size-medium-x;
  font-weight: bold;
  text-align: center;
}
.rightexam-box span {
  display: inline-block;
  width: 100%;
  color: $white;
  font-size: $font-size-medium;
  text-align: center;
}
.nav-box {
  width: 85%;
  height: 40px;
  margin: 0 auto;
  margin-top: 20px;
  background-color: #fafafa;
  border: 1px solid $bordercolor;
}
.nav-box ul {
  overflow: hidden;
}
.nav-box li {
  width: 33%;
  height: 40px;
  float: left;
  // border:1px solid red;
}
.nav-box li span {
  display: inline-block;
  width: 100%;
  height: 40px;
  font-size: $font-size-medium;
  line-height: 40px;
  font-weight: bold;
  text-align: center;
}
.nav-box li span em {
  font-weight: normal;
}
.table-box {
  width: 85%;
  margin: 0 auto;
  overflow: hidden;
  margin-top: 40px;
  border-left: 1px solid $bordercolor;
  border-top: 1px solid $bordercolor;
  border-right: 1px solid $bordercolor;
}
.table-box li {
  width: 100%;
  height: 70px;
  overflow: hidden;
  border-bottom: 1px solid $bordercolor;
}
.table-box ul .large-box {
  display: flex;
  width: 100%;
  height: 200px;
  overflow: hidden;
  // border: 1px solid red;
}
.item5-box {
  width: 10%;
  height: 200px;
  float: left;
  line-height: 200px;
  text-align: center;
  color: $blackcolor;
  font-size: $font-size-medium;
  font-weight: bold;
  border-right: 1px solid $bordercolor;
}
.item6-box {
  flex: 1;
  text-align: center;
  line-height: 70px;
}
.item6-box textarea {
  width: 100%;
  height: 200px;
  border: none;
  outline: none;
  padding-top: 90px;
  font-size: 16px;
  //margin-left: 5%;
  text-align: center;
}
.item-box {
  width: 10%;
  height: 70px;
  float: left;
  line-height: 70px;
  text-align: center;
  color: $blackcolor;
  font-size: $font-size-medium;
  font-weight: bold;
  border-right: 1px solid $bordercolor;
}
.item1-box {
  width: 40%;
  height: 70px;
  float: left;
  line-height: 70px;
  // text-align: center;
  border-right: 1px solid $bordercolor;
}
.item1-box input {
  width: 90%;
  height: 70px;
  border: none;
  outline: none;
  margin-left: 10%;
  font-size: $font-size-medium;
}
.item2-box {
  width: 39%;
  height: 70px;
  line-height: 70px;
  // text-align: center;
  float: left;
}
.item2-box input {
  width: 90%;
  height: 70px;
  border: none;
  outline: none;
  margin-left: 10%;
  font-size: $font-size-medium;
}
.block {
  margin-left: 10%;
}
.el-radio-group {
  margin-left: 10%;
}
.btn-box {
  width: 20%;
  height: 60px;
  margin: 0 auto;
  margin-top: 20px;
  padding-left: 100px;
  // border: 1px solid red;
}
</style>